#pragma once

#include "ApproachHolder.h"
#include "GridParam.h"
#include "TrajectoryBuilder.h"

class CProg2Doc : public CDocument, public OnErrorNotifyInterface, public IApproachHolder
{
protected: // create from serialization only
	CProg2Doc();
	virtual ~CProg2Doc();

	DECLARE_DYNCREATE(CProg2Doc)
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	bool OnError(LPCTSTR stzError);
public:
	bool AppendTraceApproaches(CApproachTrace::Ptr listApprc);
	bool GetApproachesInRange(const CGridParam &ranges, ListPtrApproachs &ListOut);
	bool GetInitialGridParam(CGridParam & gridParam);
protected:
	DECLARE_MESSAGE_MAP()
protected:
	CApproachHolder		m_ApproachHolder;
	CTrajectoryBuilder	m_TrajectoryBuilder;
};


